<!doctype html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>缤格</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/style.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/swiper.min.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/common.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/binge.css"/>
    <script type="text/javascript" src="../../script/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="../../script/swiper.min.js"></script>
    <script type="text/javascript" src="../../script/mobile.js"></script>
    <script type="text/javascript">
        window['adaptive'].desinWidth = 750;
        window['adaptive'].baseFont = 28;
        window['adaptive'].maxWidth = 750;
        window['adaptive'].init();
    </script>
</head>

<body>
<div id="header">
    <div class="header">
        <div class="head-back">
            <a href="javascript:void(0);" tapmode onclick="comeBack()" class="back-btn"></a>
        </div>
        <div class="head-title">
            <h6>战况列表</h6>
        </div>
        <!--<div class="head-action">
            <a href="javascript:void(0);" tapmode class="action-btn-ld"></a>
        </div>-->
    </div>
</div>


<div class="match-section">
    <div class="section">
        <div class="match-outs" style="border-bottom: none; padding-top: 0;">
            <ul id="warHtml">
                <!--<li>-->
                    <!--<div class="outs-detail" tapmode onclick="commonUrl('match_detail')">-->
                        <!--<div class="outs-img bg-cover" style="background: url('../../image/img-activity.png');"></div>-->
                        <!--<div class="outs-info">-->
                            <!--<p class="multiline-ellipsis_3 info">篮球比赛即根据篮球运动进行的比赛。篮球比赛的形式多种多样，有较为常见的五人篮球。</p>-->
                            <!--<div class="flex-div">-->
                                <!--<p>15分钟前</p>-->
                                <!--<span>25468评论</span>-->
                            <!--</div>-->
                        <!--</div>-->
                    <!--</div>-->
                <!--</li>-->
            </ul>
        </div>
    </div>
</div>


</body>

</html>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript">
    var match_id = '';//比赛id
    apiready = function () {

        setFixStatusBar(); //设置状态栏
        pop.loading();
        keybackListener()
        match_id = api.pageParam.match_id;
        console.log(match_id)

        getWarLists()

    }

    //获取战况列表
    function getWarLists() {
        var param = {
            token: $api.getStorage('token'),
            match_id: match_id,//比赛id
        }
        getAjax(Interface.get_match_war, param, function (res) {

            var data = res.data;

            if (isDefine(data)) {
                var warHtml = '';

                $.each(data, function (i, item) {
                    var war_id = {"war_id": item.id}
                    warHtml = '<li><div class="outs-detail" tapmode onclick=\'commonUrl("match_detail",' + jsonChange(war_id) + ')\'>' +
                        '                    <div class="outs-img bg-cover" style="background: url(' + ajaxUrl + item.icons_path + ');"></div>' +
                        '                    <div class="outs-info">' +
                        '                        <p class="multiline-ellipsis_3 info">' + item.title + '</p>' +
                        '                        <div class="flex-div">' +
                        '                            <p>' + item.date + '</p>' +
                        '                            <span>' + item.comment_number + '评论</span>' +
                        '                        </div>' +
                        '                    </div>' +
                        '                </div></li>';
                })

                $("#warHtml").html(warHtml)
            } else {
                $("#warHtml").html(noData)
            }


            pop.close();
        }, function (error) {
            pop.notice(error.msg);
            pop.close();
        })
    }


</script>
